package com.study.security.config.cryptography;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.keygen.BytesKeyGenerator;
import org.springframework.security.crypto.keygen.KeyGenerators;

/**
 * @author xl-9527
 * @since 2025/7/2¡
 **/
@Configuration(proxyBeanMethods = false)
public class CryptographyConfig {

    private static final Logger log = LoggerFactory.getLogger(CryptographyConfig.class);

    public void doCryptography(final Object target) {
        final BytesKeyGenerator bytesKeyGenerator = KeyGenerators.secureRandom();
        log.info("generate key -> {}", bytesKeyGenerator.generateKey());
    }
}
